﻿<%
'会员登录
'调用帮助,路径一定要对
'<!--#include file="ESYSPassport/GuestBooks.asp"-->
%>
<div id="GuestLogo">
<a href="#" onclick="showModalDialog('<%=SiteUrl%>/ESYSPassport/GuestWrite.asp','window','dialogWidth:450px;dialogHeight:280px;status:no;help:no;scroll:no;')"><img alt="我要留言" src=Images/gb_new.gif></a>
</div><%
Dim UrlID
	UrlID=Request.ServerVariables("QUERY_STRING")   '获取来源地址
	CurrentPage=Replace(UrlID,".html","")
If isnumeric(CurrentPage)=False Then
	CurrentPage=1
End If
Dim Rs
    Set Rs=Server.CreateObject("ADODB.RecordSet")
Dim Sql
    Sql="select * from Easyes_GuestBook Where Passed=True order by GuestID desc"
    Rs.PageSize=6
	Rs.CacheSize=Rs.PageSize
    Rs.Open Sql,Conn,1,1
Dim CurrentPage
    If CurrentPage="" Then
        CurrentPage=1
    Else
        CurrentPage=CurrentPage
    End If    
    If Not(Rs.Eof And Rs.Bof) Then
        Rs.AbsolutePage=CurrentPage
    End If
'翻页循环开始
  Dim I
  For I=1 To Rs.PageSize
    If Rs.Eof Then
        Exit For
    End If
%>
<div class="GuestMain">
	<div class="GuestTitle">用户：[<b><%=rs("UserName")%></b>] 发表于：<%=cstr(rs("Postdate"))%>&nbsp;来自：<%=left(rs("ip"),(len(rs("ip"))-2))+"**"%></div>
	<div class="GuestBody">	<%
	Response.write "<div class=""Guest1"">"&rs("Comments")&"</div>"
if rs("Replay")<>"" then
	Response.write "<div class=""Guest2""><strong>官方回复</strong>["&rs("ReplayDate")&"]："&rs("Replay")&"</div>"
End if
%>	</div>
</div>
<%
  Rs.MoveNext
  Next
%>
<div class="Pagelist">
<script type="text/javascript" src="<%=SiteUrl%>/ESYSPassport/PageList.js"></script>
<script type="text/javascript" language="JavaScript">
	<!--
	var plb = new PageListBar('plb',<%=Rs.PageCount%>,<%=CurrentPage%>,'.html',20);
	document.write(plb);
	//-->
</script>
</div><%
Rs.Close
Set Rs=Nothing
%>